String clazzTpl({package}) => """
import 'package:flutter/material.dart';
import 'package:$package/utils/print_util.dart';
import 'package:$package/utils/toast_util.dart';

abstract class BaseStatefulWidget extends StatefulWidget {
  const BaseStatefulWidget({Key? key}) : super(key: key);
}

abstract class BaseState<T extends BaseStatefulWidget> extends State<T> {}

abstract class BaseStatelessWidget extends StatelessWidget {
  const BaseStatelessWidget({Key? key}) : super(key: key);
}

mixin BaseStatefulMixin<T extends BaseStatefulWidget> on BaseState<T> {
  void toast(String msg) => Toast.show(msg);

  @mustCallSuper
  @override
  void initState() {
    logDebugPrint('\${this.runtimeType.toString()} initState');
    super.initState();
  }

  @mustCallSuper
  @override
  void didUpdateWidget(covariant oldWidget) {
    logDebugPrint('\${this.runtimeType.toString()} didUpdateWidget');
    super.didUpdateWidget(oldWidget);
  }

  @mustCallSuper
  @override
  void reassemble() {
    logDebugPrint('\${this.runtimeType.toString()} reassemble');
    super.reassemble();
  }

  @mustCallSuper
  @override
  void setState(fn) {
    logDebugPrint('\${this.runtimeType.toString()} setState');
    super.setState(fn);
  }

  @mustCallSuper
  @override
  void deactivate() {
    logDebugPrint('\${this.runtimeType.toString()} deactivate');
    super.deactivate();
  }

  @mustCallSuper
  @override
  void dispose() {
    logDebugPrint('\${this.runtimeType.toString()} dispose');
    super.dispose();
  }

  @mustCallSuper
  @override
  void didChangeDependencies() {
    logDebugPrint('\${this.runtimeType.toString()} didChangeDependencies');
    super.didChangeDependencies();
  }

  @mustCallSuper
  @override
  Widget build(BuildContext context) {
    logDebugPrint('\${this.runtimeType.toString()} build');
    return Container();
  }
}

mixin BaseStatelessMixin<T extends BaseStatelessWidget> on StatelessWidget {
  void toast(String msg) => Toast.show(msg);

  @mustCallSuper
  @override
  Widget build(BuildContext context) {
    logDebugPrint('\${this.runtimeType.toString()} build');
    return Container();
  }
}
""";
